Skip to content

Conversation

@AnttonLA
Copy link

Hi again,

I went back and re-visited the implementation of my proposed "GWAS track". This is a minimal implementation. I'll be very happy to build it up further, but I wanted to check that I was doing things right first.

Description

The track takes data from an IGV .gwas file (see format here), and draws a scatterplot where the x-axis is the genomic position and the y-axis is the negative log of the p-value (so the smaller the exponent, the higher it will appear).
This is the same as a localized Manhattan plot. It is useful when trying to visualize GWAS variants in relation to nearby genes, open chromatin, etc., and it's common to illustrate loci of interest in this way with tools like LocusZoom. The UCSC browser also has a built-in track with hits from the GWAS Catalog specifically to do lookups like this.

Example image:
new_track

Implementation details

I tried to keep things small and match the style of the other tracks.
I've added a GwasTrack.py script, a corresponding test script, and test and example files.

The one thing I'm unsure about is the reading to the data from the file. I wanted to avoid additional dependencies, so created a ReadGwas class. It is inspired on the 'readBed.py' file in the repo. Please let me know if I should use another approach instead, like keeping the file reading logic to GwasTrack.py or using a dependency like Pandas to keep the file-reading neat.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant